package com.pizzaria.bean;

import com.pizzaria.bean.Funcionario;
import br.com.dk.database.DBActionsBase;
import org.hibernate.criterion.Restrictions;
import java.util.List;

public class FuncionarioDAO extends DBActionsBase{
	public static Funcionario get(long id) {
		return findSingle(Funcionario.class,  Restrictions.eq("id",id));
	}
	public static Funcionario getByCpf(String o) {
		return findSingle(Funcionario.class, Restrictions.eq("cpf", o));
	}
	public static List<Funcionario> getAll() {
		return findAll(Funcionario.class);
	}
}